package com.cloud.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author jaddy0302 Rivulet User.java 2010-3-17
 * 
 */
@Document
@Data
@NoArgsConstructor
public class User implements java.io.Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@Id
	private String id;
	@Transient
	private String sessionid;

	private String username;
	private String password;
	private String email;
	private String uname;
	private String firstname;
	private String midname;
	private String lastname;
	private String language;
	private String jobtitle;
	private String department;
	private String gender;
	private String mobile;
	private String birthday;
	private String nickname;
	private String secureconf = "5";
	private String usertype; // 0 Admin User : !0 Other User

	private boolean superuser; // 是否是超级管理员

	private String orgi;
	private String creater;
	private Date createtime = new Date();
	private Date passupdatetime = new Date();
	private Date updatetime = new Date();
	private String memo;
	private String organ;
	private boolean agent;
	private boolean callcenter;
	private String skill;
	private String city; // 城市
	private String province;// 省份
	private boolean login; // 是否登录
	private boolean online; // 是否在线
	private String status; //
	private boolean datastatus;// 数据状态，是否已删除

	private Date lastlogintime = new Date(); // 最后登录时间

	private int fans; // 粉丝
	private int follows; // 关注
	private int integral; // 积分
	private List<Role> roleList = new ArrayList<Role>();
	private List<RoleAuth> roleAuthList = new ArrayList<RoleAuth>();

}
